import Vuex from 'vuex';
import Vue from 'vue';
const SHARE_BUY_BTN = "SHARE_BUY_BTN"; //分享购的去结算按钮
const CLEAR_SHARE_BUY_CAR = "CLEAR_SHARE_BUY_CAR"; //清除

const state = {
    shareCurrentCar: {}
}
const getters = {
    shareCurrentCar: (state) => state.shareCurrentCar,
};
const mutations = {
    [SHARE_BUY_BTN](state, goods) {
        state.shareCurrentCar = goods
    },
    [CLEAR_SHARE_BUY_CAR](state) {
        state.shareCurrentCar = {}
    }
};
const actions = {
    share_buy_btn({ commit }, productAll) { //分享去结算
        commit(SHARE_BUY_BTN, productAll)
    },
    clear_share_buy_car({ commit }) {
        commit(CLEAR_SHARE_BUY_CAR)
    }
};
















export default {
    state,
    mutations,
    actions,
    getters
}